<%@page import="com.liferay.portal.kernel.language.LanguageUtil"%>
<%@ page import="com.liferay.portal.service.permission.PortletPermissionUtil" %>
<%@page import="com.liferay.portal.kernel.util.WebKeys"%>
<%@page import="com.liferay.portal.theme.ThemeDisplay"%>
<%@page import="javax.portlet.PortletURL"%>
<%@page import="java.util.List"%>
<%@page import="com.liferay.portal.kernel.util.ListUtil"%>

<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %>
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@page import="doan.quanlycanbo.portlet.model.chucvu" %>
<%@page import="doan.quanlycanbo.portlet.service.chucvuLocalServiceUtil" %>

<portlet:defineObjects/>
<liferay-theme:defineObjects />

<portlet:renderURL windowState="normal" var="addFunctionURL">
	<portlet:param name="jspPage" value="/html/manage_employee/function/add_function.jsp"></portlet:param>
</portlet:renderURL> 
<br/>

<input type="button" value='<%= LanguageUtil.get(pageContext, "managecontacts.agency.view-button.addagency","Them Chuc Vu") %>' onClick="window.location.href='<%= addFunctionURL.toString() %>' "/>

<br/><br/><br/>

<%
	PortletURL renderTabFunctionURL = renderResponse.createRenderURL();
	renderTabFunctionURL.setParameter("jspPage", "/html/manage_employee/view.jsp?tab1=tab.qlcb.chucvu");
%>

<liferay-ui:search-container emptyResultsMessage="Ko co chuc vu nao" delta="15" iteratorURL="<%=renderTabFunctionURL  %>">
	<liferay-ui:search-container-results>
		<%
			List<chucvu> chucvuList = chucvuLocalServiceUtil.getAll();
			results = ListUtil.subList(chucvuList, searchContainer.getStart(), searchContainer.getEnd());
			total = chucvuList.size();
			pageContext.setAttribute("results", results);
			pageContext.setAttribute("total", total);
		%>
	</liferay-ui:search-container-results>
	<liferay-ui:search-container-row className="doan.quanlycanbo.portlet.model.chucvu" keyProperty="machucvu" modelVar="chucvu">
		<liferay-ui:search-container-column-text name='<%=LanguageUtil.get(pageContext, "managecontacts.agency.view-title.table.agency","Ten chuc vu") %>' property="tenchucvu"/>	
		<liferay-ui:search-container-column-jsp	path="/html/manage_employee/function/actions_function.jsp" align="right" />
	</liferay-ui:search-container-row>
	<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
</liferay-ui:search-container>









